#ifndef _VECTOR3D_H_
#define _VECTOR3D_H_

namespace Seegiri
{
    namespace Math
    {
        class Vector3D
        {
            public:
                Vector3D();
                Vector3D(float _x, float _y, float _z);
                Vector3D(const Vector3D& v);
                ~Vector3D();

                // Vector operations
                void zero();
                float magnitude();
                float length();
                void normalize();
                float dot(const Vector3D& v);
                const Vector3D cross(const Vector3D& v);
                
                // access fuctions
                float x() const;
                float y() const;
                float z() const;
                float * ptr();

                // assignment
                Vector3D& operator=(const Vector3D& v);

                // equality
                bool operator==(const Vector3D& v);

                // non-equality
                bool operator!=(const Vector3D& v);

                // negation
                const Vector3D operator-();

                // addition
                const Vector3D operator+(const Vector3D& v);
                Vector3D& operator+=(const Vector3D& v);

                // subtraction
                const Vector3D operator-(const Vector3D& v);
                Vector3D& operator-=(const Vector3D& v);

                // multiplication
                const Vector3D operator*(const Vector3D& v);
                Vector3D& operator*=(const Vector3D& v);

                // division
                const Vector3D operator/(const Vector3D& v);
                Vector3D& operator/=(const Vector3D& v);

                // scalar multiplication
                const Vector3D operator*(const float f);
                Vector3D& operator*=(const float f);

                // scalar division
                const Vector3D operator/(const float f);
                Vector3D& operator/=(const float f);

            private:
                float m_v[3];
        };
    }
}

#endif // _VECTOR3D_H_
